<input type="text " id="input" value="该程序已经运行了0秒">
<button id="start">开始</button>
<button id="stop2">停止</button>
<button id="goon">继续</button>
<script>
    start.onclick=function(){
        num=0
        t1= setInterval(() => {
            num++
            input.value='该程序已经运行了'+num+'秒'
        }, 1000);
    }
    stop2.onclick=function () {
        clearInterval(t1)
        clearInterval(t2)
    }
    goon.onclick=function () {
       num1= num
       t2=setInterval(() => {
           num1++
           input.value='该程序已经运行了'+num1+'秒'
       }, 1000);
    }
</script>
